package com.jdbcbase.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jdbcbase.module.Menu;
import com.jdbcbase.module.Role;
import com.jdbcbase.service.RoleService;

@Controller
@RequestMapping("/role")
public class RoleController {

	@Resource
	private RoleService roleService;
	@RequestMapping("/getRoleForOne")
	@ResponseBody
	public Role getMenuForOne(){
		String str = "";
		Role role = roleService.queryRoleForOne(str);
		return role;
	}
	@RequestMapping("/insertRole")
	@ResponseBody
	public void insertRole(){
		Role role = new Role();
		role.setRoleId("id22");
		role.setRoleName("namee");
		role.setRoleTypeId("typeid");
		role.setOrderNo(3);
		roleService.insertRole(role);
	}
}
